import request from '@/utils/request'

export function getOrderList(data) {
  return request({
    url: '/sales/order/list',
    method: 'post',
    data,
  })
}
export function getOrderSummary(data) {
  return request({
    url: '/sales/order/items/summary?size='+ data.size + '&current=' + data.current,
    method: 'post',
	data:data
  })
}

export function getOrderAdd(data) {
  return request({
    url: '/sales/order/info/add',
    method: 'post',
    data,
  })
}

// /sales/order/items/batch/add
export function getOrderitemAdd(data){
  return request({
    url: '/sales/order/items/batch/add',
    method: 'post',
    data,
  })
}

//发货
export function getDelivery(data) {
  return request({
    url: '/sales/order/items/itemsStatus',
    method: 'post',
    data,
  })
}

//删除
export function detailOrder(data) {
  return request({
    url: '/sales/order/info/del',
    method: 'post',
    data,
  })
}

//导出
export function exportOrder(data) {
  return request({
    url: '/sales/order/info/add',
    method: 'post',
    data,
  })
}

//列表详情
export function listDetail(data) {
  return request({
    url: '/sales/order/orderInfo',
    method: 'post',
    data,
  })
}

// /sales/order/items/list

export function getlistitems(params){
  return request({
    url: '/sales/order/items/list?size='+ params.size + '&current=' + params.current + '&orderid=' + params.id,
    method: 'post',

  })
}
// /sales/order/items/edit
export function listitemsedit(data){
  return request({
    url: '/sales/order/items/edit',
    method: 'post',
  data
  })
}

export function listitemseditTwo(data){
  return request({
    url: '/sales/order/info/edit',
    method: 'post',
  data
  })
}


export function getRurnList(data) {
  return request({
    url: '/sales/order/return/items/list?size='+ data.size + '&current=' + data.current,
    method: 'post',
    data,
  })
}

export function returnGoods(data) {
  return request({
    url: '/sales/order/items/edit',
    method: 'post',
    data,
  })
}

export function addreturn(data) {
  return request({
    url: '/sales/order/return/items/add',
    method: 'post',
    data,
  })
}


export function modify(data) {
  return request({
    url: '/sales/order/return/items/edit',
    method: 'post',
    data,
  })
}
